package com.ticket.sass.admin.model;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 通用列表返回信息模型
 * @author ywb
 * @date 2021-11-16 11:17
 */
@Data
@ApiModel("列表数据封装")
public class PageModel<T> implements Serializable {

    @ApiModelProperty(value = "总条数")
    private Long total;

    @ApiModelProperty(value = "当前页数据")
    private List<T> list;
    
    public PageModel() {
        total = 0L;
        list = new ArrayList<>();
    }

    public PageModel(Long total, List<T> list) {
        this.total = total;
        this.list = list;
    }
}
